package com.su.sweet.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.su.sweet.mapper.ActUserMapper;
import com.su.sweet.model.AssignVO;
import com.su.sweet.model.PageExt;
import com.su.sweet.model.UserInfo;
import com.su.sweet.service.ActUserService;
import org.apache.ibatis.solon.annotation.Db;
import org.noear.solon.annotation.Component;

import java.util.List;

@Component
public class ActUserServiceImpl implements ActUserService {
    @Db("master")
    private ActUserMapper actUserMapper;

    @Override
    public UserInfo selectUserByName(String asCode) {
        return actUserMapper.selectUserByName(asCode);
    }

    @Override
    public List<UserInfo> selectUserByRole(String asCode) {
        return actUserMapper.selectUserByRole(asCode);
    }

    @Override
    public List<UserInfo> selectUserByGroup(String asCode) {
        return actUserMapper.selectUserByGroup(asCode);
    }

    @Override
    public IPage<AssignVO> queryUserPage(PageExt<AssignVO> queryInfo, AssignVO query) {
        return actUserMapper.queryUserPage(queryInfo, query);
    }

    @Override
    public IPage<AssignVO> queryGroupPage(PageExt<AssignVO> queryInfo, AssignVO query) {
        return actUserMapper.queryGroupPage(queryInfo, query);
    }

    @Override
    public IPage<AssignVO> queryRolePage(PageExt<AssignVO> queryInfo, AssignVO query) {
        return actUserMapper.queryRolePage(queryInfo, query);
    }
}
